package com.imooc.sell.service;

import com.imooc.sell.dataobject.ProductInfo;
import com.imooc.sell.dataobject.query.ProductQuery;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Date;
import java.util.List;


/**
 * 商品管理业务类接口
 */
public interface ProductInfoService {

    ProductInfo findOne(String productId);

    List<ProductInfo> findAll();

    Page<ProductInfo> findAll(Pageable pageable);

    ProductInfo save(ProductInfo productInfo);

    Boolean delete(String id);

    Boolean deleteByCategoryType(Integer id);

    Page<ProductInfo> findProductCrCriteria(Integer page, Integer size, ProductQuery productQuery, Integer sortCode);

    Page<ProductInfo> findProductByTime(Date createTime, Date endTime, Integer page, Integer size);
}
